package com.ruoyi.logistic.service.impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.ruoyi.logistic.domain.NetworkRewardApportion;
import com.ruoyi.logistic.domain.NetworkRewardApportionStatistics;
import com.ruoyi.logistic.domain.PageDate;
import com.ruoyi.logistic.domain.vo.NetworkRewardApportionResultVo;
import com.ruoyi.logistic.domain.vo.NetworkRewardApportionVo;
import com.ruoyi.logistic.mapper.NetworkRewardApportionMapper;
import com.ruoyi.logistic.mapper.NetworkRewardApportionStatisticsMapper;
import com.ruoyi.logistic.service.NetworkRewardApportionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Date;
import java.util.List;

@Service
public class NetworkRewardApportionServiceImpl implements NetworkRewardApportionService {
    @Autowired
    private NetworkRewardApportionMapper networkRewardApportionMapper;
    @Autowired
    private NetworkRewardApportionStatisticsMapper networkRewardApportionStatisticsMapper;
    @Override
    public List<NetworkRewardApportion> selectAll(PageDate pageDate) {
        PageHelper.startPage(pageDate);
        return networkRewardApportionMapper.selectAll();
    }

    @Override
    public Boolean insert(NetworkRewardApportion networkRewardApportion) {
        return networkRewardApportionMapper.insert(networkRewardApportion);
    }

    @Override
    public Boolean update(NetworkRewardApportion networkRewardApportion) {
        return networkRewardApportionMapper.update(networkRewardApportion);
    }

    @Override
    public Boolean deleteById(Integer id) {
        return networkRewardApportionMapper.deleteById(id);
    }

    @Override
    public NetworkRewardApportion findById(Integer id) {
        return networkRewardApportionMapper.findById(id);
    }

    @Override
    public List<NetworkRewardApportion> search(NetworkRewardApportionVo networkRewardApportionVo, PageDate pageDate) {
        PageHelper.startPage(pageDate);
        return networkRewardApportionMapper.search(networkRewardApportionVo);
    }

    @Override
    public NetworkRewardApportionStatistics total(NetworkRewardApportionVo networkRewardApportionVo) {
        return networkRewardApportionStatisticsMapper.total(networkRewardApportionVo);
    }
}
